{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
  $(document).ready(function() {
    $('#party').focus();
  });
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<span style="float:left;"><button onclick="window.close();">Close</button></span>
<form name="form1" id="form1" action="{$smarty.server.PHP_SELF}" method="post">
<input type="text" name="billMasterId" value="{$masterArray.billMasterId}" size="5">
<table align="center" border="0" cellpadding="2" cellspacing="2" >
<tr><td align="center" class="table1" colspan="9">Bill Detail</td></tr>
<tr>
	<td align="center" class="table1" colspan="3">Party</td>
	<td align="center" class="table1" colspan="3">Bill Memo</td>
	<td align="center" class="table1" colspan="3">Memo Date</td>
</tr>
<tr>
	<td align="center" class="table2" colspan="3">
  <select name="partyId" id="partyId" required="required" AUTOFOCUS>
  <option value="">Select</option>
  {html_options values=$partyArray.partyId output=$partyArray.partyName selected=$masterArray.partyId}
  </select>
  </td>
	<td align="center" class="table2" colspan="3"><input type="text" size="25" name="billNo" id="billNo" {$masterArray.billNo} value="{$masterArray.billNo}"</td>
	<td align="center" class="table2" colspan="3">{html_select_date prefix="billDate" time=$masterArray.billDate start_year="-0" end_year="+2" field_order="DMY" month_format="%m" day_value_format="%02d"}</td>
</tr>
<tr><td align="center" colspan="9"><hr></td></tr>
<tr>
	<td align="center" class="table1">Out. Date</td>
	<td align="center" class="table1">Out. Challan</td>
	<td align="center" class="table1">In. Challan</td>
	<td align="center" class="table1">Material</td>
	<td align="center" class="table1">Final Process</td>
	<td align="center" class="table1">Weight</td>
	<td align="center" class="table1">Quantity</td>
	<td align="center" class="table1">Rate</td>
	<td align="center" class="table1">Amount</td>
</tr>
{section name=sec loop=$detailArray}
<tr>
	<td align="center" class="table2">{$detailArray[sec].outDate}</td>
	<td align="center" class="table2">{$detailArray[sec].outChallenNo}</td>
	<td align="center" class="table2">{$detailArray[sec].inChallenNo}</td>
	<td align="center" class="table2">{$detailArray[sec].materialName}</td>
	<td align="center" class="table2">{$detailArray[sec].finalProcess}</td>
	<td align="right" class="table2">{$detailArray[sec].outQuantity}</td>
	<td align="right" class="table2">{$detailArray[sec].outWieght}</td>
	<td align="right" class="table2">{$detailArray[sec].outRate}</td>
	<td align="right" class="table2">{$detailArray[sec].amount}</td>
</tr>
{/section}
<tr>
	<td align="right" class="table1" colspan="7">Sub Total</td>
	<td align="center" class="table2">:</td>
	<td align="right" class="table2" >{$totalAmm}</td>
</tr>
<tr>
	<td align="right" class="table1" colspan="7">Service Tax + Edu. Cess</td>
	<td align="right" class="table2"><input type="text" size="15" name="taxInPrecentage" id="taxInPrecentage" {$masterArray.taxInPrecentage} value="{$masterArray.taxInPrecentage}"</td>
	<td align="right" class="table2">{$serviceTax}</td>
</tr>
<tr>
	<td align="right" class="table1" colspan="7">Round Off</td>
	<td align="center" class="table2">:</td>
	<td align="right" class="table2"><input type="text" size="15" name="roundOff" id="roundOff" {$masterArray.roundOff} value="{$masterArray.roundOff}"</td>
</tr>
<tr>
	<td align="right" class="table1" colspan="7">Net Total</td>
	<td align="center" class="table2">:</td>
	<td align="right" class="table1">{$netTotal}</td>
</tr>
<tr>
  <td align="center" colspan="10" align="center" class="table1"><input type="submit" name="updateBtn" value="Update" class="button" /></td>
</tr>	
</table>
{/block}